<!DOCTYPE unspecified PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<body>
<?php

// Calcola codice richiesta

$email  = "";
$key = "";
$funz = "";
$calc = "";

if(isset($_REQUEST['email']))
	$email = $_REQUEST['email'];
	
if(isset($_REQUEST['key']))
	$key = $_REQUEST['key'];
	
if(isset($_REQUEST['funz']))
	$funz = $_REQUEST['funz'];

switch ($funz){
	case "md5":
		$calc = md5($email);
		break;
	case "sha1":
		$calc = sha1($email);
		break;
	default:		
}
	
	
if($key=="")
	echo "KEY = $calc";
else 
	if($key==$code)
		echo "OK";
	else
		echo "KO";
			
?>
<br/>
<a href="calcola_codice_test.php"> Back </a>
</body>
</html>	